﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ProjectManagement.Domain.Entities
{
	public class Company
	{
		public virtual int ID { get; set; }

		[Display(Name="单位名称")]
		[Required(ErrorMessage="单位名称不能为空")]
		public virtual string CompanyName { get; set; }

		//客户类别
		[Display(Name = "客户类别")]
		public virtual string CustomType { get; set; }
		// 客户类型
		[Display(Name = "客户类型")]
		public virtual string CustomClassType { get; set; }
		//行业类别
		[Display(Name = "行业类别")]
		public virtual string IndustryType { get; set; }
		//所在省
		[Display(Name = "所在省")]
		[Required(ErrorMessage="选择地区")]
		public virtual Provience Province { get; set; }
		//所在市
		[Display(Name = "所在市")]
		public virtual City City { get; set; }

		//单位类型
		[Display(Name = "单位类型")]
		public virtual string CompanyProperty { get; set; }
		//地址
		[Display(Name = "地址")]
		public virtual string Address { get; set; }

		//成立日期
		[Display(Name = "成立日期")]
		[DataType(DataType.DateTime)]
		public virtual DateTime BuildDate { get; set; }

		//注册资金
		[Display(Name = "注册资金")]
		public virtual string RegMoney { get; set; }

		//员工人数
		[Display(Name = "员工人数")]
		public virtual string EmployeeCount { get; set; }

		//单位描述
		[Display(Name = "企业描述")]
		[DataType(DataType.MultilineText)]
		public virtual string CompanyDes { get; set; }

		//单位主页
		[Display(Name = "单位主页")]
		public virtual string HomePage { get; set; }

		//法人代表
		[Display(Name = "法人代表")]
		public virtual string MasterName { get; set; }

		//单位所有人
		[Display(Name = "单位所有人")]
		public virtual User Owner { get; set; }

		//项目数
		[Display(Name = "项目数")]
		public virtual int ProjectSum { get; set; }

		//联系记录数
		[Display(Name = "联系记录数")]
		public virtual int ContactSum { get; set; }

		//最后联系时间
		[Display(Name = "最后联系时间")]
		public virtual DateTime LastContactTime { get; set; }

		//创建人
		[Display(Name = "录入人")]
		public virtual User Creator { get; set; }

		//创建时间
		[Display(Name = "录入时间")]
		public virtual DateTime CreateTime { get; set; }

		//编辑人
		[Display(Name = "编辑人")]
		public virtual User Editor { get; set; }

		//编辑时间
		[Display(Name = "编辑时间")]
		public virtual DateTime EditTime { get; set; }
	}
}
